Skip to content

[codex] Pass GitHub runner workflow dispatch inputs#33

Merged
intel352 merged 2 commits into
mainfrom
codex/github-runner-dispatch-inputs
Jun 27, 2026
Merged

[codex] Pass GitHub runner workflow dispatch inputs#33
intel352 merged 2 commits into
mainfrom
codex/github-runner-dispatch-inputs

Conversation

@intel352

Copy link
Copy Markdown
Contributor

Summary

  • passes generated runner labels/task metadata into GitHub workflow_dispatch inputs for ephemeral runner jobs
  • preserves caller-supplied workflow_inputs while overriding provider-owned safety inputs
  • covers the dynamic provider command path that dispatches dogfood target workflows

Root Cause

The GitHub runner job provider dispatched workflows with only { "ref": "main" }. The workflow-compute dogfood target needs the generated runner label array and STG task id as dispatch inputs, so the provider-backed workflow would queue on the default placeholder labels or fail required-input validation instead of targeting the ephemeral runner it just registered.

Verification

  • GOWORK=off go test ./cmd/github-actions-runner-job -run TestT915CommandRunsDynamicProviderEnvelopeThroughSidecarAndRunner -count=1
  • GOWORK=off go test ./... -count=1
  • GOWORK=off go build ./cmd/github-actions-runner-job
  • GOWORK=off go build ./cmd/github-runner-provider
  • git diff --check

Regression Proof

With production fix reverted and the new test retained:

$ GOWORK=off go test ./cmd/github-actions-runner-job -run TestT915CommandRunsDynamicProviderEnvelopeThroughSidecarAndRunner -count=1
FAIL — decode ephemeral runner request: json: unknown field "workflow_inputs"

With fix restored:

$ GOWORK=off go test ./cmd/github-actions-runner-job -run TestT915CommandRunsDynamicProviderEnvelopeThroughSidecarAndRunner -count=1
ok github.com/GoCodeAlone/workflow-plugin-github/cmd/github-actions-runner-job

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR ensures ephemeral runner workflow dispatches include the generated runner metadata (labels/task id) as workflow_dispatch inputs, while preserving caller-provided inputs and overriding provider-owned safety inputs for the dynamic provider path.

Changes:

  • Add workflow_inputs support to the ephemeral runner job request model and argument parsing.
  • Extend the sidecar dispatch call to include optional inputs in the workflow dispatch payload.
  • Add test coverage asserting dispatch payload includes merged inputs and enforced provider-owned inputs.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
internal/module_runner_provider.go Parses workflow_inputs from module args into the job request.
internal/ephemeral_runner_job.go Extends EphemeralRunnerJobRequest with WorkflowInputs.
cmd/github-actions-runner-job/main.go Sends merged workflow dispatch inputs and enforces provider-owned dispatch inputs.
cmd/github-actions-runner-job/main_test.go Verifies dispatch request includes expected inputs and preserves caller input.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cmd/github-actions-runner-job/main.go Outdated
@intel352
intel352 marked this pull request as ready for review June 27, 2026 09:28
@intel352
intel352 merged commit 1728c71 into main Jun 27, 2026
5 checks passed
@intel352
intel352 deleted the codex/github-runner-dispatch-inputs branch June 27, 2026 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants